var webRoot = G_WEB_ROOT;
var urls = {
	pcProductList: webRoot + '/pc/pcProductList',
	pcIemt: webRoot + '/pc/pcIemt'
};

// 商品列表
var Ks_ProductZone = {
	render: function (rs) {
		if (rs.length <= 0) return;
		var html = '';
		html +=
			'<div class="j_nav"><h2>'
			+ '	<a href="' + urls.pcProductList + '?classifyId=' + rs[0].classifyId + '">'
			+ '		<span class="lab-left"><i class="i_today_zb"></i>' + rs[0].classifyName + '</span>'
			+ ' </a>'
			+ '	<a href="' + urls.pcProductList + '?classifyId=' + rs[0].classifyId + '">'
			+ '		<span class="lab-right">更多型号</span>'
			+ ' </a>'
			+ '</h2><ul>';
		$.each(rs, function (index, item) {
			index++;
			if (index % 4 == 0) {
				html +=
					'	<li class="no-margin">'
					+ '		<a href="' + urls.pcIemt + '?productId=' + item.id + '">'
					+ '			<p class="p_title">' + item.name + '</p>'
					+ '			<img src="' + webRoot + '/' + item.imgPath + '"/>'
					// + '			<span class="span_con">'
					// + '				<p class="p_price">'
					// + '					<span class="p_price1 showPrice">￥<span>' + item.price + '</span></span>'
					// + '					<span class="p_price1">首付：<span>' + item.downPayment + '</span></span>'
					// + '					<span class="p_price1">月供：' + item.monthlyPayment + '</span>'
					// //						+'					<span class="p_zk">6.5折</span>'
					// + '				</p>'
					// + '			</span>'
					+ '			<div id="dmp">'
					+ '				<div id="dp" class="d_bh arrow">'
					+ '					<div class="arrow-right"></div>首付：'+item.downPayment
					+ '				</div>'
					+ '				<div id="mp" class="d_bh arrow" style="font-size: 12px;color: #000;">月供：￥'+ item.monthlyPayment 
					+ '				</div>'
					+ '			</div>'
					+ '		</a>'
					+ '	</li>';
			} else {
				html +=
					'	<li class="">'
					+ '		<a href="' + urls.pcIemt + '?productId=' + item.id + '"> '
					+ '			<p class="p_title">' + item.name + '</p>'
					+ '			<img src="' + webRoot + '/' + item.imgPath + '"/>'
					// + '			<span class="span_con">'
					// + '				<p class="p_price">'
					// + '					<span class="p_price1 showPrice">￥<span>' + item.price + '</span></span>'
					// + '					<span class="p_price1">首付：<span>' + item.downPayment + '</span></span>'
					// + '					<span class="p_price1">月供：' + item.monthlyPayment + '</span>'
					// //						+'					<span class="p_zk">6.5折</span>'
					// + '				</p>'
					// + '			</span>'
					+ '			<div id="dmp">'
					+ '				<div id="dp" class="d_bh arrow">'
					+ '					<div class="arrow-right"></div>首付：'+item.downPayment
					+ '				</div>'
					+ '				<div id="mp" class="d_bh arrow" style="font-size: 12px;color: #000;">月供：￥'+ item.monthlyPayment 
					+ '				</div>'
					+ '			</div>'
					+ '		</a>'
					+ '	</li>';
			}
		});
		html += '</ul></div>';
		$("#Ks_ProductZone").append(html);
	}
}
